package app.dao;

import java.sql.Timestamp;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import app.domain.FixOrder;

public interface FixOrderDao {
   void addFixOrder(FixOrder fixOrder);
   List<FixOrder> findByRequire(@Param(value="id")Integer fixOrderId,
		                        @Param(value="accountId")Integer accountId,
		                        @Param(value="handleStatus")Integer handleStatus,
		                        @Param(value="dateStart")Timestamp dateStart,
		                        @Param(value="dateEnd")Timestamp dateEnd);
   void delete(int id);
   FixOrder findById(int id);
   void updateHandleStatus(@Param(value="fixOrderId")int fixOrderId,@Param(value="handleStatus")int handleStatus);
   void update(FixOrder fixOrder);

   List<FixOrder> findWorkerRequire(@Param(value="workerId")Integer workerId,@Param(value="fixOrderId")Integer fixOrderId,@Param(value="handleStatus") Integer handleStatus);
   void updateFinishTime(@Param(value="fixOrderId")int fixOrderId,@Param(value="finishTime")Timestamp finishTime);

   Integer findByTime(@Param(value="preDate")String format,@Param(value="nextDate") String format2);
   Integer findByTimeForWork(@Param(value="preDate")String format,@Param(value="nextDate") String format2);

}
